<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="fhdb" content="true">
    <title>地址管理</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/address.css">
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
     <script type="text/javascript">
         $(function () {
             $.ajax({
                 type: "post",
                 url: "/order/SelectAddress",
                 success: function (data) {
                     if (data == "") {
                         $(".receipt").hide();
                         return;
                     }

                     if (data.msg == "_timeout") {
                         window.location.href = "../UserLogin/Login.html";
                     }
                     $("#shuser").text(data[0].TB_USERNAME)
                     $("#phone").text(data[0].TB_PHONE)
                     $(".detailedAddress").text(data[0].TB_DIQU + data[0].TB_ADDRESS)
                     $(".addAddress").hide();
                 }
             });
         })
    </script>
</head>
<body>
    <div class="backBox" onClick="javascript:location.href = 'personalCenter.html';">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </div>
    <div class="topTitle ">地址管理 <span class="addAddress">添加新地址</span></div>
    <div class="receipt">
        <div class="leftBox">
            <div class="receivingInformation">
                <span>收货人：</span>
                <span id="shuser"></span>
                <span id="phone"></span>
            </div>
            <div class="detailedAddress"></div>
        </div>
        <div class="rightBox">
            <span class="glyphicon glyphicon-chevron-right"></span>
        </div>
    </div>
    <div></div>
</body>
<script>
    $(document).ready(function () {
        $(".addAddress").click(function(){
            location.href = 'receivingAddress.html';
        })
        $(".receipt").click(function(){
            location.href = 'receivingAddress.html';
        })
    })
</script>
</html>